package com.perceptivesoftware.licensing.client.common.util;

import com.google.gwt.user.client.rpc.IsSerializable;

public enum NotificationDetailType implements IsSerializable {
	TO(1L), CC(2L);

	private Long val;

	private NotificationDetailType(final Long val) {
		this.val = val;
	}

	public Long getVal() {
		return val;
	}

	public static NotificationDetailType getTypeByVal(final Long value) {
		for (final NotificationDetailType hte : NotificationDetailType.values()) {
			if (hte.getVal().equals(value)) {
				return hte;
			}
		}
		throw new RuntimeException("Unknown NotificationDetailType " + value);
	}
}
